package com.to_door_recycle.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 用户对订单中回收人员评价
 * @TableName recycler_comment
 */
@TableName(value ="recycler_comment")
@Data
public class RecyclerComment implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 对回收员的评论内容
     */
    @TableField(value = "comment")
    private String comment;

    /**
     * 服务态度
     */
    @TableField(value = "service_attitude")
    private String serviceAttitude;

    /**
     * 回收效率
     */
    @TableField(value = "recycle_efficient")
    private String recycleEfficient;

    /**
     * 上门准时度
     */
    @TableField(value = "come_speed")
    private String comeSpeed;

    /**
     * 回收人员评分
     */
    @TableField(value = "score")
    private String score;

    /**
     * 订单编号
     */
    @TableField(value = "order_id")
    private String orderId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RecyclerComment other = (RecyclerComment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getComment() == null ? other.getComment() == null : this.getComment().equals(other.getComment()))
            && (this.getServiceAttitude() == null ? other.getServiceAttitude() == null : this.getServiceAttitude().equals(other.getServiceAttitude()))
            && (this.getRecycleEfficient() == null ? other.getRecycleEfficient() == null : this.getRecycleEfficient().equals(other.getRecycleEfficient()))
            && (this.getComeSpeed() == null ? other.getComeSpeed() == null : this.getComeSpeed().equals(other.getComeSpeed()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getComment() == null) ? 0 : getComment().hashCode());
        result = prime * result + ((getServiceAttitude() == null) ? 0 : getServiceAttitude().hashCode());
        result = prime * result + ((getRecycleEfficient() == null) ? 0 : getRecycleEfficient().hashCode());
        result = prime * result + ((getComeSpeed() == null) ? 0 : getComeSpeed().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", comment=").append(comment);
        sb.append(", serviceAttitude=").append(serviceAttitude);
        sb.append(", recycleEfficient=").append(recycleEfficient);
        sb.append(", comeSpeed=").append(comeSpeed);
        sb.append(", score=").append(score);
        sb.append(", orderId=").append(orderId);
        sb.append(", createTime=").append(createTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}